<? 
defined('_JEXEC') or die('Restricted access!'); 
?>

<form action="index.php" method="post" name="adminForm">
<? if(isset($this->codes) && count($this->codes)>0) { ?>
<div id="editcell">
    <table class="adminlist">
        <thead>
            <tr>
                <th width="25">№</th>
                <th><?php echo JText::_( 'COM_COUPONS_CODE' ); ?></th>
            </tr>
        </thead>
        <?  $i=1;
            foreach($this->codes as $code) { ?>
            <tr class="<? echo "row".($i%2); ?>">
                <td width="25"><? echo $i; ?></td>
                <td><? echo $code; ?></td>
            </tr>
        <? $i++; } ?>
    </table>
</div>
<? } else echo "<h1 class='center'>No Codes!</h1>" ?>
<div class="clr"></div>

<input type="hidden" name="option" value="com_coupons" />
<input type="hidden" name="task" value="" />

</form>
